import { createRouter, createWebHistory } from 'vue-router';
import Login from '../components/Login.vue';
import Home from '../components/Home.vue';
import registration from '@/components/registration.vue';
import Daohang from '@/components/daohang.vue';
const routes = [
  {

    path: '/',
    redirect: '/login'
  },
  {
    path: '/login',
    name: 'Login',
    component: Login,
  },
  {
    path: '/home',
    name: 'Home',
    component: Home,
  },
  {
    path:"/registration",
    name:"registration",
    component:registration,
  },
  {
    path:"/daohang",
    name:"daohang",
    component:Daohang,
  },
  {
    path:'/RoleManagement',
    name:'RoleManagementanage',
    component: () => import('@/components/RoleManagement.vue'),
  },
  {
    path: '/MenuManagement',
    name: 'MenuManagement',
    component: () => import('@/components/MenuManagement.vue'),
  },
  {
    path: '/PermissionControl',
    name: 'PermissionControl',
    component: () => import('@/components/PermissionControl.vue'),
  },
  {
    path: '/system',
    name: 'SystemSetting',
    component: () => import('@/components/SystemSetting.vue'),
  },
  {
    path: '/LogManagement',
    name: 'LogManagement',
    component: () => import('@/components/LogManagement.vue'),
  },
  {
    path: '/ArticleManagement',
    name: 'ArticleManagement',
    component: () => import('@/components/ArticleManagement.vue'),
  },
  {
    path: '/FileManagement',
    name: 'FileManagement',
    component: () => import('@/components/FileManagement.vue'),
  },
  {
    path: '/UserInfoManagement',
    name: 'UserInfoManagement',
    component: () => import('@/components/UserInfoManagement.vue'),
  },
];

const router = createRouter({
  history: createWebHistory(),
  routes,
});

export default router;
